<html>
<head><meta charset="utf-8"><title>freeze stage0 · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html">freeze stage0</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203751048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751048">(Jul 13 2020 at 18:22)</a>:</h4>
<p>Is it possible to 'freeze' stage0? it seems crazy that if I change a single line in a mir transformation i have to recompile stage0 and then all of stage1, why can't I just recompile <code>librustc_mir</code>?</p>



<a name="203751180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751180">(Jul 13 2020 at 18:23)</a>:</h4>
<p><code>./x.py build --keep-stage 0</code> I think</p>



<a name="203751185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751185">(Jul 13 2020 at 18:23)</a>:</h4>
<p>I think if you use <code>--keep-stage 1</code>, stage 1 stdlib won't be compiled again</p>



<a name="203751204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751204">(Jul 13 2020 at 18:23)</a>:</h4>
<p>can i set those options in <code>config.toml</code>?</p>



<a name="203751425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751425">(Jul 13 2020 at 18:25)</a>:</h4>
<p>I don't think so</p>



<a name="203751907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751907">(Jul 13 2020 at 18:29)</a>:</h4>
<p>weeeeee using <code>keep-stage 0</code> dropped a 1 line change rebuild from 5m42 to 1m30</p>



<a name="203751925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751925">(Jul 13 2020 at 18:29)</a>:</h4>
<p>still long but muuuch more manageable</p>



<a name="203751983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203751983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203751983">(Jul 13 2020 at 18:29)</a>:</h4>
<p>if lld worked on mac i'd switch to it since that seems to speed things up as well</p>



<a name="203752999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203752999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203752999">(Jul 13 2020 at 18:37)</a>:</h4>
<blockquote>
<p>can i set those options in <code>config.toml</code>?</p>
</blockquote>
<p>You don't want to, --keep-stage will lead to weird errors if the compiler changes too much, you need to recompile the standard library once in a while</p>



<a name="203753208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753208">(Jul 13 2020 at 18:38)</a>:</h4>
<blockquote>
<p>I have to recompile stage0 then all of stage1</p>
</blockquote>
<p>Do you need stage1 specifically? Can you use <code>build --stage 1 src/libstd</code> instead? That will only build the stage0 compiler</p>



<a name="203753604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753604">(Jul 13 2020 at 18:42)</a>:</h4>
<p>ugh... using <code>keep-stage 0</code> doesn't work, it doesn't seem to compile my changes in</p>



<a name="203753667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753667">(Jul 13 2020 at 18:42)</a>:</h4>
<p>I need  to build <code>librustc_mir</code></p>



<a name="203753687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753687">(Jul 13 2020 at 18:42)</a>:</h4>
<p>What command were you using?</p>



<a name="203753718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753718">(Jul 13 2020 at 18:42)</a>:</h4>
<p><code>./x.py build -i --stage 1 --keep-stage 0</code></p>



<a name="203753760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753760">(Jul 13 2020 at 18:43)</a>:</h4>
<p>it seems really weird cuz all i did was include logging</p>



<a name="203753780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753780">(Jul 13 2020 at 18:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/freeze.20stage0/near/203753208">said</a>:</p>
<blockquote>
<blockquote>
<p>I have to recompile stage0 then all of stage1</p>
</blockquote>
<p>Do you need stage1 specifically? Can you use <code>build --stage 1 src/libstd</code> instead? That will only build the stage0 compiler</p>
</blockquote>
<p>I think this is what you need <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="203753782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753782">(Jul 13 2020 at 18:43)</a>:</h4>
<p>weird that staging would be the problem..</p>



<a name="203753817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203753817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203753817">(Jul 13 2020 at 18:43)</a>:</h4>
<p>The <a href="https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#building-the-compiler">rustc dev guide</a> has a few tips btw</p>



<a name="203754064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754064">(Jul 13 2020 at 18:45)</a>:</h4>
<p>ah i should have read the recommended workflows page :P</p>



<a name="203754209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754209">(Jul 13 2020 at 18:46)</a>:</h4>
<p>IIRC what's happening here is that:</p>
<ul>
<li><code>./x.py build -i --stage 1</code> means "build the stage 1 compiler from stage 0 artifacts", where "stage 0 artifacts" include the compiler, so effectively you're building the compiler twice</li>
<li><code>./x.py build -i --stage 1 src/libstd</code> means "build the stage 1 libstd from stage 0 artifacts", so it will build a stage 0 compiler, then stage 1 libstd and stop there, so you only build the compiler once</li>
</ul>



<a name="203754283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754283">(Jul 13 2020 at 18:46)</a>:</h4>
<p>Yes, that's correct</p>



<a name="203754339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754339">(Jul 13 2020 at 18:47)</a>:</h4>
<p>I'm trying to make bullet point two the default for <code>--stage 1</code> since a compiler without libstd is pretty useless and you normally only want to build rustc once</p>



<a name="203754372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754372">(Jul 13 2020 at 18:47)</a>:</h4>
<p>what's weird though is that the command generates a new stage1 binary?</p>



<a name="203754412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754412">(Jul 13 2020 at 18:47)</a>:</h4>
<p>if it's not building the stage1 compiler how is that possible?</p>



<a name="203754504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754504">(Jul 13 2020 at 18:48)</a>:</h4>
<p>/shrug it works for me now</p>



<a name="203754570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754570">(Jul 13 2020 at 18:49)</a>:</h4>
<p>I guess it depends on what you are calling stage 1? x)</p>



<a name="203754601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754601">(Jul 13 2020 at 18:49)</a>:</h4>
<p>The stage1 binary is not the same as the stage1 artifacts</p>



<a name="203754623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754623">(Jul 13 2020 at 18:49)</a>:</h4>
<p>The stage1 artifacts are the things <em>built with</em> stage1/rustc</p>



<a name="203754760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754760">(Jul 13 2020 at 18:50)</a>:</h4>
<p>It's confusing because the build directory refers to the compiler that's running but the <code>x.py</code> args refer to the compiler being built</p>



<a name="203754784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754784">(Jul 13 2020 at 18:50)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> and I have argued about this :P</p>



<a name="203754837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754837">(Jul 13 2020 at 18:51)</a>:</h4>
<p>Yeah it's confusing, but at least only infra and release people have to worry about it <span aria-label="stuck out tongue" class="emoji emoji-1f61d" role="img" title="stuck out tongue">:stuck_out_tongue:</span></p>



<a name="203754845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754845">(Jul 13 2020 at 18:51)</a>:</h4>
<p>ohhhh ok so <code>--stage 1</code> is referring to the artifacts built from stage1?</p>



<a name="203754860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754860">(Jul 13 2020 at 18:51)</a>:</h4>
<p>Yes exactly</p>



<a name="203754870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754870">(Jul 13 2020 at 18:51)</a>:</h4>
<p>ok it all makes sense now</p>



<a name="203754898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754898">(Jul 13 2020 at 18:51)</a>:</h4>
<blockquote>
<p>Yeah it's confusing, but at least only infra and release people have to worry about it :P</p>
</blockquote>
<p>I disagree, see e.g. this thread</p>



<a name="203754900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203754900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xavier Denis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203754900">(Jul 13 2020 at 18:51)</a>:</h4>
<p>I thought it meant _build_ the stage1 binary</p>



<a name="203755061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755061">(Jul 13 2020 at 18:53)</a>:</h4>
<p><span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span> <span class="user-mention" data-user-id="119009">@eddyb</span> this is what my idea to change x.py was</p>



<a name="203755086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755086">(Jul 13 2020 at 18:53)</a>:</h4>
<p>That you said was confusing for other reasons</p>



<a name="203755318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755318">(Jul 13 2020 at 18:55)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/freeze.20stage0/near/203754898">said</a>:</p>
<blockquote>
<blockquote>
<p>Yeah it's confusing, but at least only infra and release people have to worry about it <span aria-label="stuck out tongue" class="emoji emoji-1f61d" role="img" title="stuck out tongue">:stuck_out_tongue:</span></p>
</blockquote>
<p>I disagree, see e.g. this thread</p>
</blockquote>
<p>I meant, once you have learnt that you should use <code>./x.py build --stage 1 src/libstd</code>, you don't have to remember the details of the bootstrapping process</p>



<a name="203755373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755373">(Jul 13 2020 at 18:55)</a>:</h4>
<p>Yeah, making that the default should help a lot</p>



<a name="203755414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755414">(Jul 13 2020 at 18:55)</a>:</h4>
<p>But I still think the other numbering makes more sense</p>



<a name="203755539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755539">(Jul 13 2020 at 18:56)</a>:</h4>
<p>Plus we'll need to change that command once the standard library is moved to its own directory (soon)?</p>



<a name="203755575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755575">(Jul 13 2020 at 18:56)</a>:</h4>
<p>Well, that I don't expect to be too confusing</p>



<a name="203755590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203755590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203755590">(Jul 13 2020 at 18:56)</a>:</h4>
<p>Just a pain to update the docs</p>



<a name="203771043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203771043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203771043">(Jul 13 2020 at 21:03)</a>:</h4>
<p><span class="user-mention silent" data-user-id="312719">Xavier Denis</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/freeze.20stage0/near/203751983">said</a>:</p>
<blockquote>
<p>if lld worked on mac i'd switch to it since that seems to speed things up as well</p>
</blockquote>
<p>I've been pointed at <a href="https://github.com/michaeleisel/zld">https://github.com/michaeleisel/zld</a> but haven't used it myself yet.</p>



<a name="203772664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203772664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203772664">(Jul 13 2020 at 21:17)</a>:</h4>
<p>Oh btw <span class="user-mention" data-user-id="312719">@Xavier Denis</span> I missed that you were using <code>-i</code>, you can set that permanently in config.toml with incremental = true</p>



<a name="203780451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780451">(Jul 13 2020 at 22:43)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> <span class="user-mention" data-user-id="312719">@Xavier Denis</span> it's only confusing because "stage1 binary" can be seen as a thing, even though it's really not what it looks like</p>



<a name="203780493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780493">(Jul 13 2020 at 22:43)</a>:</h4>
<p>like I bet if it wasn't <code>stage1/bin/rustc</code> but <code>stage0to1/bin/rustc</code> it'd make more sense?</p>



<a name="203780555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780555">(Jul 13 2020 at 22:44)</a>:</h4>
<p>(and <code>x.py build --stage 1</code> would build all the way to having a <code>stage1to2/bin/rustc</code> but no further into <code>stage2-*</code>)</p>



<a name="203780669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780669">(Jul 13 2020 at 22:44)</a>:</h4>
<p>the directories <em>literally</em> named <code>stageN</code> are the wrong ones currently, in that they're "between" stages</p>



<a name="203780682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780682">(Jul 13 2020 at 22:45)</a>:</h4>
<p><code>stageN-*</code> however, match perfectly</p>



<a name="203780923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780923">(Jul 13 2020 at 22:48)</a>:</h4>
<p>so currently, this is what it looks like:</p>
<ul>
<li><code>stage0/bin/rustc</code> is used to build <code>srage0-{std,rustc}</code></li>
<li><code>stage0-rustc/release/rustc</code> is copied to <code>stage1/bin/rustc</code></li>
<li><code>stage1/bin/rustc</code> is used to build <code>srage1-{std,rustc}</code></li>
<li><code>stage1-rustc/release/rustc</code> is copied to <code>stage2/bin/rustc</code></li>
</ul>



<a name="203780960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780960">(Jul 13 2020 at 22:48)</a>:</h4>
<p>we could probably not do that last step unless you're actually building anything <em>at</em> stage2</p>



<a name="203780977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203780977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203780977">(Jul 13 2020 at 22:49)</a>:</h4>
<p>and frankly, the <code>stageN</code> directories... we could name them with "sysroot" in their names or something, or even just try to hide them, idk</p>



<a name="203781012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781012">(Jul 13 2020 at 22:49)</a>:</h4>
<p>but they're basically "output of stage N-1, input of stage N", and used as "sysroots" to do the build, they're not <em>the</em> stage</p>



<a name="203781106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781106">(Jul 13 2020 at 22:50)</a>:</h4>
<p>the only usecase for poking at those directories that is currently "official" is <code>rustup toolchain link</code>, and we could probably solve that by having a <code>x.py symstall</code> or <code>x.py rustup-link</code> or w/e functionality for hooking them up</p>



<a name="203781124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781124">(Jul 13 2020 at 22:51)</a>:</h4>
<p>bonus: <code>x.py symstall</code> could work for system-wide non-rustup "dev installation"</p>



<a name="203781131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781131">(Jul 13 2020 at 22:51)</a>:</h4>
<p>(in case you need to test that)</p>



<a name="203781223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781223">(Jul 13 2020 at 22:52)</a>:</h4>
<p>There's also the usecase of using <code>rustfmt</code> in e.g. rust-analyzer</p>



<a name="203781248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781248">(Jul 13 2020 at 22:52)</a>:</h4>
<p>and the best part is that (I hope) e.g. the <code>rustc</code> symlink and the <code>rustlib</code> one can be separate, and the actual files live wherever the build system needs them to</p>



<a name="203781255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781255">(Jul 13 2020 at 22:52)</a>:</h4>
<p><span class="user-mention" data-user-id="255061">@LeSeulArtichaut</span> what do you mean?</p>



<a name="203781269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781269">(Jul 13 2020 at 22:53)</a>:</h4>
<p>the executables would be <em>somewhere</em>, RA should definitely not hardcode any paths into <code>build/</code> though</p>



<a name="203781304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781304">(Jul 13 2020 at 22:53)</a>:</h4>
<p>I mean, for <a href="https://rustc-dev-guide.rust-lang.org/building/suggested.html#configuring-rust-analyzer-for-rustc">this</a> kind of thing</p>



<a name="203781347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203781347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203781347">(Jul 13 2020 at 22:54)</a>:</h4>
<p>yeah we'd just change that</p>



<a name="203923701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/freeze%20stage0/near/203923701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/freeze.20stage0.html#203923701">(Jul 15 2020 at 07:28)</a>:</h4>
<p>also see <a href="https://github.com/rust-lang/rust/issues/59864">https://github.com/rust-lang/rust/issues/59864</a> which has some helpful explanations leading to a mental model of rustc's staging</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>